<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="menu" content="mainMenu" />
<meta name="nav" content="0" />
<meta name="acc" content="2" />
<title>单位管理</title>
<script type="text/javascript">
	$(document).ready(
					function() {
						$("#orgName").focus();
						$("#inputForm").validate(
										{
											rules : {
												orgName : {
													required : true,
													remote : "external_organization!checkOrgName.action?oldOrgName="
															+ encodeURIComponent('${orgName}')
												},
												orgTelephone : "required",
												orgAddress : "required",
												orgTelephone : "digits",
												postCode : "digits",
												orgHome : "url",
												email :{
													required:true,
													email:true
												} 
											},
											messages : {
												orgNum : {
													remote : "<font color='red'>机构代码证已存在</font>"
												}
											}
										});
						$("input[name='finishDate']")
								.addClass("Wate")
								.bind(
										"focus",
										function() {
											WdatePicker({
												skin : 'whyGreen',
												minDate : '1900-10-01',
												maxDate : '#F{$dp.$D(\'finishDate\')||\'%y-%M-%d\'}',
												dateFmt : 'yyyy-MM-dd'
											});
										});
						$("input[name='checkDate']").addClass("Wate").bind(
								"focus", function() {
									WdatePicker({
										skin : 'whyGreen',
										minDate : '#F{$dp.$D(\'checkDate\')}',
										maxDate : '%y-%M-%d',
										dateFmt : 'yyyy-MM-dd'
									});
								});
						$("#liNum").focus();
					});

	function changeOrgName() {
		var orgId = $("input[name='organization.id']").val();
		var url = "";
		if (orgId) {
			url = "<c:url value='/account/api/external_organization.action?id='/>"
					+ orgId;
		} else {
			url = "<c:url value='/account/api/external_organization.action'/>"
		}
		var obj = new Object();
		mm = window
				.showModalDialog(
						url,
						obj,
						'dialogHeight:500px;dialogWidth:780px;status:no;toolbar:no;resizable:no;menubar:no;location:no;scrollbars:no;dialogLeft:'
								+ (screen.width / 2.0 - 150) + ',dialogTop:170')
		if (mm != null) {
			$("input[name='organization.id']").val(mm.id);
			$("input[name='organization.orgName']").val(mm.orgName);
		}
	}
</script>
</head>
<body>

<form action="external_organization!save.action" method="post"
	class="yform" id="inputForm"><input type="hidden" id="id"
	name="id" value="${id }">
	<div id="caption" class="external_organization"><h6>修改单位</h6></div>
<table class="noborder">
	<tr class="type-text">
		<td>单位名称</td>
		<td colspan="3"><input type="text" id="orgName" name="orgName"
			value="${orgName }" /></td>
	</tr>


	<tr class="type-text">
		<td>主管部门</td>
		<td colspan="3"><input type="text" id="burderDep" name="burderDep"
			value="${burderDep}" /></td>
	</tr>
	<tr class="type-text">
		<td>级&nbsp;&nbsp;别</td>
		<td><input type="text" id="orgLevel" name="orgLevel"
			value="${orgLevel }" /></td>
		<td>行政级别</td>
		<td><input type="text" id="politicsLevel" name="politicsLevel"
			value="${politicsLevel }"></td>
	</tr>
	<tr class="type-text">
		<td>成立时间</td>
		<td><input type="text" id="finishDate" name="finishDate"
			value="${finishDate }"></td>
		<td>考核时间</td>
		<td><input type="text" id="checkDate" name="checkDate"
			value="${checkDate }"></td>
	</tr>
	<tr class="type-text">
		<td>单位电话</td>
		<td><input type="text" id="orgTelephone" name="orgTelephone"
			value="${orgTelephone }" /></td>
		<td>传真</td>
		<td><input type="text" id="portraiture" name="portraiture"
			value="${portraiture }" /></td>
	</tr>
	<tr class="type-text">
		<td>电子邮箱</td>
		<td><input type="text" id="email" name="email" value="${email }"></td>
		<td>邮政编码</td>
		<td><input type="text" id="postCode" name="postCode"
			value="${postCode }" /></td>
	</tr>
	<tr class="type-text">
		<td>经费来源</td>
		<td ><input type="text" id="moneySource"
			name="moneySource" value="${moneySource }"></td>
		<td>机构代码证</td>
		<td><input type="text" id="orgNum" name="orgNum"
			value="${orgNum }" /></td>
	</tr>
	<tr class="type-text">
		<td>单位主页</td>
		<td colspan="3"><input type="text" id="orgHome" name="orgHome"
			value="${orgHome }"></td>
	</tr>
	<tr class="type-text">
		<td>单位地址</td>
		<td colspan="3"><input type="text" id="orgAddress"
			name="orgAddress" value="${orgAddress }"></td>
	</tr>
	<tr class="type-text">
		<td>单位职能</td>
		<td colspan="3"><textarea rows="3" cols="60" name="functionsOrg">${functionsOrg }</textarea></td>
	</tr>
	<tr class="type-text">
		<td>基本简况</td>
		<td colspan="3"><textarea rows="3" cols="60" id="basicInfo"
			name="basicInfo">${basicInfo }</textarea></td>
	</tr>
	<tr class="type-text">
		<td>备注</td>
		<td colspan="3"><textarea rows="3" cols="60" id="remark"
			name="remark">${remark }</textarea></td>
	</tr>
</table>
		<div class="type-button"><input   type="submit"
			class="submit" value="提交" />&nbsp; <input  
			type="button" value="返回" class="reset" onclick="history.back()" /></div>
</form>
</body>
</html>